<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class CategoryWidget extends CWidget
{
    public $name;
    public $model;
    public function init()
    {
         parent::init();
         switch ($this->name)
         {
             case 'category': $this->model=Category::getMenu(); break;
             case 'catalog': $this->model='2'; break;
             case 'spravka': $this->model='3'; break;
         }
    }
 
    public function run()
    {
        $this->render('CategoryWidget/index',array('model'=>$this->model));
    }
}
